from lxml import etree
if __name__ == '__main__':
    tree = etree.parse('张晓波.html')
    # r = tree.xpath('/html/body/div/ul/li')
    # r = tree.xpath('//div[@id="menu"]/ul/li[5]/a/text()')[0]
    r = tree.xpath('//div[@id="menu"]/ul/li[5]/a/@href')[0]
    print(r)